<template>
  <div class="box">
    <navBar :navBar="navBar"></navBar>
    <div class="content">
      <p class="title">{{ $t("挖矿赚不停") }}</p>
      <p class="note">{{ $t("锁仓挖矿定义") }}</p>
      <div class="bgBox">
        <p class="comTtl">{{ $t("产品亮点") }}</p>
        <div class="innerArea">
          <div class="itemInner">
            <p class="ttl">{{ $t("随存随取") }}</p>
            <p class="text">{{ $t("派息周期") }}</p>
          </div>
          <div class="itemInner">
            <p class="ttl">{{ $t("每日下发") }}</p>
            <p class="text">{{ $t("活期利息") }}</p>
          </div>
        </div>
        <div class="subArea">
          <div class="itemInner">
            <img src="../../assets/images/icon09.png" alt="" />
            <p class="text">{{ $t("资金安全保障") }}</p>
          </div>
          <div class="itemInner">
            <img src="../../assets/images/icon10.png" alt="" />
            <p class="text">{{ $t("节假日收益不间断") }}</p>
          </div>
          <div class="itemInner">
            <img src="../../assets/images/icon11.png" alt="" />
            <p class="text">{{ $t("成功存入后当天起息") }}</p>
          </div>
        </div>
      </div>
      <div class="bgBox">
        <p class="comTtl">{{ $t("举个例子") }}</p>
        <p class="comNote">{{ $t("收益计算") }}</p>
        <div v-html="shouyi"></div>
      </div>
      <div class="bgBox">
        <p class="comNote">{{ $t("关于违约金") }}</p>
        <div v-html="yuewei"></div>
      </div>
    </div>
    <div class="button" @click="goOther">
      <p>{{ $t("我要参与") }}</p>
    </div>
  </div>
</template>

<script>
import navBar from "@/components/navBar.vue";
export default {
  name: "LockUpMining",
  components: { navBar },
  data() {
    return {
      navBar: {
        back: true,
        title: this.$t("锁仓挖矿"),
        close: false,
        btn: "",
      },
      shouyi: "",
      yuewei: "",
    };
  },

  mounted() {
    this.init();
  },

  methods: {
    init(){
      let data = {
        language: String(this.$i18n.locale).toUpperCase()
      }
	 
      $postAxios(api.getMiningDes, data, (res) => {
        if (res.code == 0) {
          this.shouyi = res.data.shouyi;
          this.yuewei = res.data.yuewei;
        } else {
          this.$toast(this.$t(res.msg));
        }
      });
    },
    // 跳转页面
    goOther() {
      this.$router.push("/wealthList");
    },
  },
};
</script>

<style lang="scss" scoped>
.box {
  padding-top: 40px;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  box-sizing: border-box;
  background: #091731 url("../../assets/images/bg04.png") no-repeat center top;
  background-size: cover;
  .content {
    padding: 30px 20px 80px;
    width: 100%;
    position: absolute;
    left: 0;
    top: 44px;
    bottom: 54px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    .title {
      margin-bottom: 30px;
      color: #fff;
      font-size: 18px;
      text-align: center;
    }
    .note {
      margin-bottom: 30px;
      color: #fff;
      font-size: 12px;
    }
    .bgBox {
      margin-bottom: 10px;
      padding: 15px;
      border-radius: 10px;
      background-color: #fff;
      ::v-deep p {
        color: #303133;
        font-size: 14px;
      }
      .comTtl {
        margin-bottom: 15px;
        color: #007aff;
        font-size: 16px;
        font-weight: 800;
        text-align: center;
      }
      .innerArea {
        margin-bottom: 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .itemInner {
          width: 50%;
          flex-shrink: 0;
          .ttl {
            margin-bottom: 5px;
            color: #000;
            font-size: 16px;
            font-weight: 700;
            text-align: center;
          }
          .text {
            color: #303133;
            font-size: 12px;
            text-align: center;
          }
        }
      }
      .subArea {
        display: flex;
        align-items: center;
        justify-content: space-between;
        .itemInner {
          width: 33.33%;
          flex-shrink: 0;
          .text {
            margin: 0 10px;
            color: #303133;
            font-size: 12px;
            text-align: center;
          }
          img {
            margin: 0 auto 10px;
            width: auto;
            height: 40px;
            display: block;
          }
        }
      }
      .comNote {
        color: #000;
        font-size: 16px;
        font-weight: 700;
      }
    }
  }
  .button {
    width: 95%;
    position: absolute;
    left: 2.5%;
    bottom: 20px;
    z-index: 10;
    color: #fff;
    font-size: 18px;
    line-height: 46px;
    text-align: center;
    border-radius: 5px;
    background-color: #24acd4;
  }
}
</style>